package com.csyf.manager.dao;

import com.csyf.manager.entity.SysPaymentChannel;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.UpdateProvider;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

/**
 * @Author: Casper
 * @Date: 2018-7-9 10:47:50
 */
public interface SysPaymentChannelDao extends Mapper<SysPaymentChannel> {

    @Select("SELECT channel_name AS channelName,channel_no AS channelNo,rate,free,merchant_No merchantNo FROM sys_payment_channel where agent_id = #{agentId}" )
    List<SysPaymentChannel> queryByAgentId(Long agentId);


    @UpdateProvider(type = PaymentChannelSqlProvider.class, method = "updatePaymentStatus")
    void updateByStatus(SysPaymentChannel entity);


}
